﻿Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient

Public Class UsuarioDB
    Public Shared Function Autenticar(ByVal usuario As String, ByVal contrasena As String) As SqlDataReader
        Dim dr As SqlDataReader
        Dim cmd As New SqlCommand("spGetUsuarioyPassword", DB.Conexion)

        cmd.Parameters.AddWithValue("@usuario", usuario)
        cmd.Parameters.AddWithValue("@password", contrasena)

        cmd.Connection.Open()
        cmd.CommandType = CommandType.StoredProcedure
        dr = cmd.ExecuteReader

        Return dr
    End Function
End Class
